home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / dom / nsIScriptContextOwner.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  6KB  |  149 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIScriptContextOwner.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIScriptContextOwner_h__
  6. #define __gen_nsIScriptContextOwner_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. #include "nscore.h"
  18. #include "nsIScriptContext.h"
  19. class nsIScriptContext; /* forward declaration */
  20.  
  21. class nsIScriptGlobalObject; /* forward declaration */
  22.  
  23.  
  24. /* starting interface:    nsIScriptContextOwner */
  25. #define NS_ISCRIPTCONTEXTOWNER_IID_STR "a94ec640-0bba-11d2-b326-00805f8a3859"
  26.  
  27. #define NS_ISCRIPTCONTEXTOWNER_IID \
  28.   {0xa94ec640, 0x0bba, 0x11d2, \
  29.     { 0xb3, 0x26, 0x00, 0x80, 0x5f, 0x8a, 0x38, 0x59 }}
  30.  
  31. class NS_NO_VTABLE nsIScriptContextOwner : public nsISupports {
  32.  public: 
  33.  
  34.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISCRIPTCONTEXTOWNER_IID)
  35.  
  36.   /**
  37.    * Returns a script context. The assumption is that the
  38.    * script context has an associated script global object and
  39.    * is ready for script evaluation.
  40.    */
  41.   /* nsIScriptContext getScriptContext (); */
  42.   NS_IMETHOD GetScriptContext(nsIScriptContext **_retval) = 0;
  43.  
  44.   /**
  45.    * Returns the script global object
  46.    */
  47.   /* nsIScriptGlobalObject getScriptGlobalObject (); */
  48.   NS_IMETHOD GetScriptGlobalObject(nsIScriptGlobalObject **_retval) = 0;
  49.  
  50.   /**
  51.    * Called to indicate that the script context is no longer needed.
  52.    * The caller should <B>not</B> also call the context's Release()
  53.    * method.
  54.    */
  55.   /* void releaseScriptContext (in nsIScriptContext aContext); */
  56.   NS_IMETHOD ReleaseScriptContext(nsIScriptContext *aContext) = 0;
  57.  
  58.   /**
  59.    * Error notification method. Informs the owner that an error 
  60.    * occurred while a script was being evaluted.
  61.    */
  62.   /* void reportScriptError (in string aErrorString, in string aFileName, in long aLineNo, in string aLineBuf); */
  63.   NS_IMETHOD ReportScriptError(const char *aErrorString, const char *aFileName, PRInt32 aLineNo, const char *aLineBuf) = 0;
  64.  
  65. };
  66.  
  67. /* Use this macro when declaring classes that implement this interface. */
  68. #define NS_DECL_NSISCRIPTCONTEXTOWNER \
  69.   NS_IMETHOD GetScriptContext(nsIScriptContext **_retval); \
  70.   NS_IMETHOD GetScriptGlobalObject(nsIScriptGlobalObject **_retval); \
  71.   NS_IMETHOD ReleaseScriptContext(nsIScriptContext *aContext); \
  72.   NS_IMETHOD ReportScriptError(const char *aErrorString, const char *aFileName, PRInt32 aLineNo, const char *aLineBuf); 
  73.  
  74. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  75. #define NS_FORWARD_NSISCRIPTCONTEXTOWNER(_to) \
  76.   NS_IMETHOD GetScriptContext(nsIScriptContext **_retval) { return _to GetScriptContext(_retval); } \
  77.   NS_IMETHOD GetScriptGlobalObject(nsIScriptGlobalObject **_retval) { return _to GetScriptGlobalObject(_retval); } \
  78.   NS_IMETHOD ReleaseScriptContext(nsIScriptContext *aContext) { return _to ReleaseScriptContext(aContext); } \
  79.   NS_IMETHOD ReportScriptError(const char *aErrorString, const char *aFileName, PRInt32 aLineNo, const char *aLineBuf) { return _to ReportScriptError(aErrorString, aFileName, aLineNo, aLineBuf); } 
  80.  
  81. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  82. #define NS_FORWARD_SAFE_NSISCRIPTCONTEXTOWNER(_to) \
  83.   NS_IMETHOD GetScriptContext(nsIScriptContext **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScriptContext(_retval); } \
  84.   NS_IMETHOD GetScriptGlobalObject(nsIScriptGlobalObject **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetScriptGlobalObject(_retval); } \
  85.   NS_IMETHOD ReleaseScriptContext(nsIScriptContext *aContext) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReleaseScriptContext(aContext); } \
  86.   NS_IMETHOD ReportScriptError(const char *aErrorString, const char *aFileName, PRInt32 aLineNo, const char *aLineBuf) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReportScriptError(aErrorString, aFileName, aLineNo, aLineBuf); } 
  87.  
  88. #if 0
  89. /* Use the code below as a template for the implementation class for this interface. */
  90.  
  91. /* Header file */
  92. class nsScriptContextOwner : public nsIScriptContextOwner
  93. {
  94. public:
  95.   NS_DECL_ISUPPORTS
  96.   NS_DECL_NSISCRIPTCONTEXTOWNER
  97.  
  98.   nsScriptContextOwner();
  99.  
  100. private:
  101.   ~nsScriptContextOwner();
  102.  
  103. protected:
  104.   /* additional members */
  105. };
  106.  
  107. /* Implementation file */
  108. NS_IMPL_ISUPPORTS1(nsScriptContextOwner, nsIScriptContextOwner)
  109.  
  110. nsScriptContextOwner::nsScriptContextOwner()
  111. {
  112.   /* member initializers and constructor code */
  113. }
  114.  
  115. nsScriptContextOwner::~nsScriptContextOwner()
  116. {
  117.   /* destructor code */
  118. }
  119.  
  120. /* nsIScriptContext getScriptContext (); */
  121. NS_IMETHODIMP nsScriptContextOwner::GetScriptContext(nsIScriptContext **_retval)
  122. {
  123.     return NS_ERROR_NOT_IMPLEMENTED;
  124. }
  125.  
  126. /* nsIScriptGlobalObject getScriptGlobalObject (); */
  127. NS_IMETHODIMP nsScriptContextOwner::GetScriptGlobalObject(nsIScriptGlobalObject **_retval)
  128. {
  129.     return NS_ERROR_NOT_IMPLEMENTED;
  130. }
  131.  
  132. /* void releaseScriptContext (in nsIScriptContext aContext); */
  133. NS_IMETHODIMP nsScriptContextOwner::ReleaseScriptContext(nsIScriptContext *aContext)
  134. {
  135.     return NS_ERROR_NOT_IMPLEMENTED;
  136. }
  137.  
  138. /* void reportScriptError (in string aErrorString, in string aFileName, in long aLineNo, in string aLineBuf); */
  139. NS_IMETHODIMP nsScriptContextOwner::ReportScriptError(const char *aErrorString, const char *aFileName, PRInt32 aLineNo, const char *aLineBuf)
  140. {
  141.     return NS_ERROR_NOT_IMPLEMENTED;
  142. }
  143.  
  144. /* End of implementation class template. */
  145. #endif
  146.  
  147.  
  148. #endif /* __gen_nsIScriptContextOwner_h__ */
  149.